package org.lisen.patterndemo.chain.v02;

import org.lisen.patterndemo.chain.Message;

public class ChackSyntaxFilter implements Filter {

    @Override
    public boolean doFilter(Message message) {
        String content = message.getContent();

        if(!content.contains("<") && !content.contains(">")) {
            return true;
        }

        content = content.replace("<", "#");
        content = content.replace(">", "#");
        message.setContent(content);

        return true;
    }

}
